<?php
if (!defined('WEB_ROOT')) {
    exit;
}

$errorMessage = (isset($_GET['error']) && $_GET['error'] != '') ? $_GET['error'] : '&nbsp;';
$branchList = getBranchList();
?> 
<p class="errorMessage"><?php echo $errorMessage; ?></p>
<form action="processUser.php?action=add" method="post" enctype="multipart/form-data" name="frmAddUser" id="frmAddUser">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="entryTable">
        <tr>
            <td width="150" class="label">User Name</td>
            <td class="content"> <input name="txtUserName" type="text" class="box" id="txtUserName" size="20" maxlength="20"></td>
        </tr>
        <tr>
            <td width="150" class="label">Password</td>
            <td class="content"> <input name="txtPassword" type="password" class="box" id="txtPassword" value="" size="20" maxlength="20"></td>
        </tr>
        <tr>
            <td width="150" class="label">Branch</td>
            <td class="content">
                <select name="cboBranch" id="cboBranch" class="box">
                    <option value="" selected>-- Choose Branch --</option>
                    <?php
                    foreach ($branchList as $branch) {
                        extract($branch);
                        echo"<option value=\"$br_id\" >$br_name</option>";
                        
                    }

                    ?>
                </select>
            </td>
        </tr>



    </table>
    <p align="center">
        <input name="btnAddUser" type="button" id="btnAddUser" value="Add User" onClick="checkAddUserForm();" class="box">
        &nbsp;&nbsp;<input name="btnCancel" type="button" id="btnCancel" value="Cancel" onClick="window.location.href='index.php';" class="box">
    </p>
</form>